<?php

require_once 'common/conn.php';

$usercode = $_GET['usercode'];
if (!isset($usercode)) {
    $usercode = $_POST['usercode'];
}

$data = array();
$db = new DBC();
$sql = "SELECT * FROM t_gold_record ORDER BY amount DESC LIMIT 0,5";
$data = $db->fetchData($sql);

echo json_encode($data);
?>